﻿using System;
using System.Web.UI.WebControls;
using BLL;

public partial class ProductRepair_ViewRepair_PackageSNChangeViewbyDT : System.Web.UI.Page
{
    private PackageSNChange psc;
    private DateTime dt1
    {
        get { return DateTime.Parse(ViewState["dt1"].ToString()); }
        set { ViewState["dt1"] = value; }
    }
    private DateTime dt2
    {
        get { return DateTime.Parse(ViewState["dt2"].ToString()); }
        set { ViewState["dt2"] = value; }
    }

    public ProductRepair_ViewRepair_PackageSNChangeViewbyDT()
    {
        psc = new PackageSNChange();
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        dt1 = DateTime.Parse(this.TextBox1.Value.Trim());
        dt2 = DateTime.Parse(this.TextBox2.Value.Trim());
        BindData();
    }

    protected void BindData()
    {
        this.GridView1.DataSource = psc.GetPackageSNChangebyDT(dt1, dt2);
        this.GridView1.DataBind();
    }

    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GridView1.PageIndex = e.NewPageIndex;
        BindData();
    }
}
